package tech.aistar.ajax;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * @author success
 * @version 1.0
 * @description:本类用来演示:
 * @date 2019/9/16 0016
 */
@WebServlet(urlPatterns = "/hello/ajax")
public class HelloAjaxAction extends HttpServlet{

    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String name = req.getParameter("name");
        System.out.println("name:"+name);
        System.out.println("ajax...");

        PrintWriter out = resp.getWriter();

        out.print("ok");
    }
}
